﻿#region Includes
using System;
using System.Runtime.InteropServices;
#endregion

namespace GingerGL.Drawing.MD3
{
    //------------------------------------------------------------//
    /// <summary>
    /// IDS MD3 TexCoord
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
    public struct MD3TexCoord
    {
        //--------------------------------------------------------//
        #region Variables
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.R4, SizeConst = 2)]
        public float[] UV;                                      //s and t texture coordinates, normalized to the range [0, 1]. 
                                                                //Values outside the range indicate wraparounds/repeats. 
                                                                //Unlike UV coordinates, the origin for texture coordinates is 
                                                                //located in the upper left corner (similar to the coordinate system used for computer screens) whereas, 
                                                                //in UV mapping, it is placed in the lower left corner. As such, 
                                                                //the t value must be flipped to correspond with UV coordinates. 
                                                                //See also Left-hand coordinates
        #endregion
        //--------------------------------------------------------//
    }
    //------------------------------------------------------------//
}
